<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>首页</title>
    <link rel="stylesheet" href="/layui/css/layui.css">
    <script src="/layui/layui.js"></script>
    <script src="https://apps.bdimg.com/libs/jquery/2.1.4/jquery.min.js"></script>
</head>
<body>
<form class="layui-form" id="add" style="display: none;padding-right: 20px;padding-top: 20px;" lay-filter="formDemo">
    <input type="number" id="id" name="id" hidden>
    <div class="layui-form-item">
        <label class="layui-form-label">题目</label>
        <div class="layui-input-block">
            <input type="text" name="question" id="question" lay-verify="title" autocomplete="off" placeholder="请输入题目内容" class="layui-input">
        </div>
    </div>
    <div class="layui-form-item">
        <label class="layui-form-label">选项A</label>
        <div class="layui-input-block">
            <input type="text" name="optionA" id="optionA" lay-verify="required" placeholder="请输入A选项内容" autocomplete="off" class="layui-input">
        </div>
    </div>
    <div class="layui-form-item">
        <label class="layui-form-label">选项B</label>
        <div class="layui-input-block">
            <input type="text" name="optionA" id="optionB" lay-verify="required" placeholder="请输入B选项内容" autocomplete="off" class="layui-input">
        </div>
    </div>
    <div class="layui-form-item">
        <label class="layui-form-label">选项C</label>
        <div class="layui-input-block">
            <input type="text" name="optionA" id="optionC" lay-verify="required" placeholder="请输入C选项内容" autocomplete="off" class="layui-input">
        </div>
    </div>
    <div class="layui-form-item">
        <label class="layui-form-label">选项D</label>
        <div class="layui-input-block">
            <input type="text" name="optionA" id="optionD" lay-verify="required" placeholder="请输入D选项内容" autocomplete="off" class="layui-input">
        </div>
    </div>
    <div class="layui-form-item">
        <label class="layui-form-label">题目类型</label>
        <div class="layui-input-block">
            <select name="type" id="type">
                <option value="0">0</option>
                <option value="1">1</option>
            </select>
        </div>
    </div>
    <div class="layui-form-item">
        <label class="layui-form-label">提交人</label>
        <div class="layui-input-block">
            <input type="text" name="creator" id="creator" lay-verify="required" placeholder="提交人姓名" autocomplete="off" class="layui-input">
        </div>
    </div>
</form>

    <table id="demo" lay-filter="test"></table>

<script type="text/html" id="navBar">
    <a class="layui-btn layui-btn-primary layui-border-green" lay-event="add">添加</a>
    <a class="layui-btn layui-btn-danger" lay-event="del">删除</a>
</script>

<script type="text/html" id="barDemo">
    <a class="layui-btn layui-btn-xs" lay-event="edit">编辑</a>
    <a class="layui-btn layui-btn-danger layui-btn-xs" lay-event="del">删除</a>
</script>
</body>
<script src="/layui/question.js"></script>
</html>
